package com.domain.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * 
 * @TableName user_session
 */
@TableName(value ="user_session")
@Data
public class UserSession implements Serializable {
    /**
     * 
     */
    @TableId(value = "id",type = IdType.AUTO)
    private Integer id;

    /**
     * 最后一次查看时间
     */
    @TableField(value = "last_select_time")
    private long lastSelectTime;

    /**
     * 删除记录的时间
     */
    @TableField(value = "delete_record_time")
    private long deleteRecordTime;

    /**
     * 是否置顶
     */
    @TableField(value = "is_sticky")
    private Integer isSticky;

    /**
     * 用户id
     */
    @TableField(value = "user_id")
    private Long userId;

    /**
     * 会话id,如果是私聊，这个字段表示接受者的id，如果是群聊，这个字段表示队伍id
     */
    @TableField(value = "session_id")
    private Long sessionId;

    /**
     * 会话类型
     */
    @TableField(value = "type")
    private Integer type;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}